<?php
    class CustomerAction extends AppAction {
        public function _initialize(){
            $this->model=new App_customerModel();
        }
        //获取全部客户列表  110
        public function index(){
            if($_POST['requestType']=='110'){
                $map['c.site_id']=__SITEID__;
                $data=$this->model->customer($map,'0');
                $this->callback($data);
            }
        }
        //获取某个客户信息  111
        public function customer(){
            if($_POST['requestType']=='111'){
                if($_POST['requestId']){
                    $map['c.id']=$_POST['requestId'];
                    $map['c.site_id']=__SITEID__;
                    $data=$this->model->customer($map,'1');
                    $this->callback($data);
                }else{//空查全部
                    $map['c.site_id']=__SITEID__;
                    $data=$this->model->customer($map,'0');
                    $this->callback($data);
                }
            }
        }
    }